package com.anjho.dao;

import java.util.List;

import com.anjho.pojo.Product;

public class DAOProduct extends DAOGeneric {

	private static final long serialVersionUID = -2073101124124204476L;

	public DAOProduct() {
		super();
	}

	@SuppressWarnings("unchecked")
	public List<Product> getProductList() throws Exception {
		return (List<Product>)super.getList("Product.getProductList");
	}
	
	@SuppressWarnings("unchecked")
	public List<Product> getProductListWhereReturnIsNull() throws Exception {
		return (List<Product>)super.getList("Product.getProductListWhereReturnIsNull");
	}
	
	public Product getProductByBarcode(String barcode) throws Exception {
		return (Product)super.getObjectByParameter(new String[] {"barcode"}, new Object[]{barcode}, "Product.getProductByBarcode");
	}

}
